<%--
  Created by IntelliJ IDEA.
  User: 16657
  Date: 2018/10/28
  Time: 13:12
  To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>upload page</title>
</head>
<body>
<div id="resp"></div>
<input type="button" onclick="req();" value="请求"/>
</body>
<script type="text/javascript" src="${pageContext.request.contextPath}/assets/js/jquery-1.10.2.js"></script>
<script>
    function req() {
        $.ajax({
            url: "convert",
            data: "1-wangmin",//后台处理按照此格式处理，用“-”隔开
            type: "POST",
            contentType: "application/x-wisely",//自定义的媒体类型application/x-wisely
            success: function (data) {
                $("#resp").html(data);
            }
        })
    }

</script>
</html>
